/****************************************
*  This file created using "Writer B"   *
*      a program written by CTonk       *
*          ctonk87@hotmail.com          *
*     [timestamp 02/20/06  12:51:45]    *
****************************************/

// Area.h

#ifndef AREA_H
#define AREA_H

#include "definitions.h"
#include <iostream>
#include <fstream>
#include <list>
#include "room.h"
#include "mob.h"
#include "object.h"
#include "reset.h"
#include "definitions.h"

class Area {
	private:
		int		_number;
		int		_firstv;
		int		_lastv;
		int		_size;
		char*	_keyword; // Array set with length 20
		char*	_file; // Array set with length 55
		char*	_name; // Array set with length 40
		time_t	_nextReset;
		std::list< int >		_permissions;
		std::list< Room* >		_rooms;
		std::list< Mob* >		_mobs;
		std::list< Object* >	_objects;
		std::list< Reset* >		_resets;

		void	loadObject( std::ifstream& );

	public:
		// Constructors...
		Area();
		Area( Area& );
		~Area();

		// Operators...
		Area& operator = ( Area& );
		//Room* operator [] ( int );

		// Public accessor methods...
		int		GetNumber();
		void	SetNumber( int );
		int		GetFirstv();
		void	SetFirstv( int );
		int		GetLastv();
		void	SetLastv( int );
		int		GetSize();
		void	SetSize( int );
		char*	GetKeyword( void );
		char	GetKeyword( int );
		void	SetKeyword( char* );
		void	SetKeyword( const char* );
		void	SetKeyword( int, char );
		char*	GetFile( void );
		char	GetFile( int );
		void	SetFile( char* );
		void	SetFile( const char* );
		void	SetFile( int, char );
		char*	GetName( void );
		char	GetName( int );
		void	SetName( char* );
		void	SetName( const char* );
		void	SetName( int, char );
		void	setNextReset( time_t );
		time_t	getNextReset();
		std::list< int >& getPermissions();
		void	addPermission( int );
		bool	getPermission( int );
		void	dropPermission( int );
		std::list< Room* >& getRooms();
		Room*	addRoom();
		Room*	getRoom( int );
		std::list< Mob* >& getMobs();
		Mob*	addMob();
		Mob*	getMob( int );
		std::list< Object* >& getObjects();
		Object* addObject();
		Object* getObject( int );
		std::list< Reset* >& getResets();

		// Other methods...
		Object*	createObject( int, int, int, int );
		void	resetArea();
		void	Save( std::ofstream& write );
		void	Load( std::ifstream& read );

		// Randomness...
		static int numAreas;
};



#endif // #ifndef AREA_H
